//
//  StatusTableCell.m
//  LoveFreshBeen
//
//  Created by vinsent on 16/10/20.
//  Copyright © 2016年 魏根. All rights reserved.
//

#import "StatusTableCell.h"
#import "MyorderViewModel.h"

@interface StatusTableCell ()

@property (weak, nonatomic) IBOutlet UIImageView *linePoint;

@end
@implementation StatusTableCell

- (void)drawRect:(CGRect)rect {
    
    UIBezierPath *path = [UIBezierPath bezierPath];
    
    CGFloat centerX = self.linePoint.center.x;
    if (!self.isFirstCell) {
        [path moveToPoint:CGPointMake(centerX, 0)];
        [path addLineToPoint:self.linePoint.center];
    } else {
        [self.linePoint setHighlighted:YES];
    }
    if (!self.isLastCell) {
        
        [path moveToPoint:self.linePoint.center];
        [path addLineToPoint:CGPointMake(self.linePoint.center.x, self.bounds.size.height)];
        
    } else {
        [self setSeparatorInset:UIEdgeInsetsMake(0, [UIScreen mainScreen].bounds.size.width, 0, 0)];
    }
    [[UIColor lightGrayColor] set];
    path.lineWidth = 1;
    [path stroke];
}


- (void)setStatusM:(StatusModel *)statusM {
    _statusM = statusM;
    _statusTimeLable.text = statusM.status_time;
    _statusTitleLable.text = statusM.status_title;
    _statusDescLable.text = statusM.status_desc;
}
@end
